<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>动画</title>
    <style>
        html,
        body {
            width: 100%;
            perspective: 10000px;
        }

        .square {
            position: relative;
            height: 600px;
            width: 100%;
            border: 5px red solid;
            background-image: url(image/草地.webp);
            background-size: cover;
            display: flex;
            transform-style: preserve-3d;
            align-items: center;
        }

        .she {
            width: 100px;
            height: 100px;
            position: absolute;
            background-image: url(image/国足.png);
            background-size: cover;
            font-size: 0;
            color: red;
            animation: secondanimation 7s linear infinite;
            text-align: right;
        }
        /* .she::after{
            content:"chao";
            transition: all 7s ease;

        } */

        .ball {
            width: 30px;
            height: 30px;
            position: absolute;
            background-image: url(image/足球.png);
            background-size: cover;
            border-radius: 50%;
            animation: myanimation 7s linear infinite;
        }

        .shou {
            width: 120px;
            height: 100px;
            position: absolute;
            background-image: url(image/守门员.png);
            background-size: cover;
            right: 10%
        }

        .door {
            width: 120px;
            height: 100px;
            position: absolute;
            background-image: url(image/龙门.png);
            background-size: cover;
            right: 0%
        }

        @keyframes myanimation {
            from {}

            25% {
                transform: translateX(300px)translateY(300px)rotate(360deg);
                box-shadow: 2px 2px 2px 2px rgb(223, 69, 8);
            }

            50% {
                transform: translateY(50px)translateX(600px)rotate(720deg);
                box-shadow: 2px 2px 2px rgb(223, 94, 8);
            }

            75% {
                transform: translateX(1000px)translateY(-300px)rotate(1080deg);
                box-shadow: 2px 2px 2px rgb(223, 76, 8);

            }

            90% {
                transform: translateX(1200px)translateY(50px)rotate(1440deg);
                box-shadow: 2px 2px 2px rgb(223, 51, 8);
            }

            to {
                box-shadow: none;
                transform: translateY(-200px)translateX(-200px)rotate(-360deg)scale(3);
            }

        }

        @keyframes secondanimation {
            from {
                font-size: 0;
            }

            90% {
                /* font-size: 0; */
            }

            to {
                font-size: 10px;
            }
        }
    </style>
</head>

<body>
    <div class="square">
        <div class="she">chao</div>
        <div class="ball"></div>
        <div class="shou"></div>
        <div class="door"></div>
    </div>
</body>

</html>